package com.kt.mes.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.kt.mes.mapper.WasteStoreListMapper;
import com.kt.mes.domain.WasteStoreList;
import com.kt.mes.service.IWasteStoreListService;

/**
 * 废料详情Service业务层处理
 * 
 * @author lzc
 * @date 2021-04-19
 */
@Service
public class WasteStoreListServiceImpl implements IWasteStoreListService 
{
    @Autowired
    private WasteStoreListMapper wasteStoreListMapper;

    /**
     * 查询废料详情
     * 
     * @param id 废料详情ID
     * @return 废料详情
     */
    @Override
    public WasteStoreList selectWasteStoreListById(Long id)
    {
        return wasteStoreListMapper.selectWasteStoreListById(id);
    }

    /**
     * 查询废料详情列表
     * 
     * @param wasteStoreList 废料详情
     * @return 废料详情
     */
    @Override
    public List<WasteStoreList> selectWasteStoreListList(WasteStoreList wasteStoreList)
    {
        return wasteStoreListMapper.selectWasteStoreListList(wasteStoreList);
    }

    /**
     * 新增废料详情
     * 
     * @param wasteStoreList 废料详情
     * @return 结果
     */
    @Override
    public int insertWasteStoreList(WasteStoreList wasteStoreList)
    {
        wasteStoreList.setCreateTime(DateUtils.getNowDate());
        return wasteStoreListMapper.insertWasteStoreList(wasteStoreList);
    }

    /**
     * 修改废料详情
     * 
     * @param wasteStoreList 废料详情
     * @return 结果
     */
    @Override
    public int updateWasteStoreList(WasteStoreList wasteStoreList)
    {
        wasteStoreList.setUpdateTime(DateUtils.getNowDate());
        return wasteStoreListMapper.updateWasteStoreList(wasteStoreList);
    }

    /**
     * 批量删除废料详情
     * 
     * @param ids 需要删除的废料详情ID
     * @return 结果
     */
    @Override
    public int deleteWasteStoreListByIds(Long[] ids)
    {
        return wasteStoreListMapper.deleteWasteStoreListByIds(ids);
    }

    /**
     * 删除废料详情信息
     * 
     * @param id 废料详情ID
     * @return 结果
     */
    @Override
    public int deleteWasteStoreListById(Long id)
    {
        return wasteStoreListMapper.deleteWasteStoreListById(id);
    }
}
